package com.supor.aiot.common.entity;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

/**
 * ---------------------------------------------------------------- <br>
 * Copyright (C) 2014-2020, by het, Shenzhen, All rights reserved.  <br>
 * ---------------------------------------------------------------- <br>
 * <p>
 * 描述: UserInfo <br>
 * 作者: lei <br>
 * 日期: 2020/12/8 <br>
 */
public class UserInfo implements Parcelable, Cloneable {
    String bossUserId;
    String providerId;
    String passwd;
    String nickName;
    String name;
    String sex;
    String birth;
    String idCard;
    String tel;
    String mobile;
    String openId;
    String faceImage;
    String email;
    String userType;
    String chronology;
    String sign;

    public UserInfo() {
    }

    public String getBossUserId() {
        return bossUserId;
    }

    public void setBossUserId(String bossUserId) {
        this.bossUserId = bossUserId;
    }

    public String getProviderId() {
        return providerId;
    }

    public void setProviderId(String providerId) {
        this.providerId = providerId;
    }

    public String getPasswd() {
        return passwd;
    }

    public void setPasswd(String passwd) {
        this.passwd = passwd;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getBirth() {
        return birth;
    }

    public void setBirth(String birth) {
        this.birth = birth;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getFaceImage() {
        return faceImage;
    }

    public void setFaceImage(String faceImage) {
        this.faceImage = faceImage;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public String getChronology() {
        return chronology;
    }

    public void setChronology(String chronology) {
        this.chronology = chronology;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.bossUserId);
        dest.writeString(this.providerId);
        dest.writeString(this.passwd);
        dest.writeString(this.nickName);
        dest.writeString(this.name);
        dest.writeString(this.sex);
        dest.writeString(this.birth);
        dest.writeString(this.idCard);
        dest.writeString(this.tel);
        dest.writeString(this.mobile);
        dest.writeString(this.openId);
        dest.writeString(this.faceImage);
        dest.writeString(this.email);
        dest.writeString(this.userType);
        dest.writeString(this.chronology);
        dest.writeString(this.sign);
    }

    protected UserInfo(Parcel in) {
        this.bossUserId = in.readString();
        this.providerId = in.readString();
        this.passwd = in.readString();
        this.nickName = in.readString();
        this.name = in.readString();
        this.sex = in.readString();
        this.birth = in.readString();
        this.idCard = in.readString();
        this.tel = in.readString();
        this.mobile = in.readString();
        this.openId = in.readString();
        this.faceImage = in.readString();
        this.email = in.readString();
        this.userType = in.readString();
        this.chronology = in.readString();
        this.sign = in.readString();
    }

    public static final Creator<UserInfo> CREATOR = new Creator<UserInfo>() {
        @Override
        public UserInfo createFromParcel(Parcel source) {
            return new UserInfo(source);
        }

        @Override
        public UserInfo[] newArray(int size) {
            return new UserInfo[size];
        }
    };

    @NonNull
    @Override
    public UserInfo clone() {
        try {
            return (UserInfo) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return new UserInfo();
    }

    @Override
    public String toString() {
        return "UserInfo{" +
                "bossUserId='" + bossUserId + '\'' +
                ", providerId='" + providerId + '\'' +
                ", passwd='" + passwd + '\'' +
                ", nickName='" + nickName + '\'' +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", birth='" + birth + '\'' +
                ", idCard='" + idCard + '\'' +
                ", tel='" + tel + '\'' +
                ", mobile='" + mobile + '\'' +
                ", openId='" + openId + '\'' +
                ", faceImage='" + faceImage + '\'' +
                ", email='" + email + '\'' +
                ", userType='" + userType + '\'' +
                ", chronology='" + chronology + '\'' +
                ", sign='" + sign + '\'' +
                '}';
    }
}
